import request from '@/utils/request'

// 查询菜单列表
export function list(query) {
  return request({
    url: '/nav/category/list',
    method: 'get',
    params: query
  })
}

// 查询菜单详细
export function get(menuId) {
  return request({
    url: '/nav/category/' + menuId,
    method: 'get'
  })
}

// 新增菜单
export function add(data) {
  return request({
    url: '/nav/category',
    method: 'post',
    data: data
  })
}

// 修改菜单
export function update(data) {
  return request({
    url: '/nav/category',
    method: 'put',
    data: data
  })
}

// 删除菜单
export function del(menuId) {
  return request({
    url: '/nav/category/' + menuId,
    method: 'delete'
  })
}
